import request from '@/utils/request'

// 查询采购管理-采购到货单主列表
export function listArrived(query) {
  return request({
    url: '/cg/arrived/list',
    method: 'get',
    params: query
  })
}

// 查询采购管理-采购到货单主详细
export function getArrived(id) {
  return request({
    url: '/cg/arrived/' + id,
    method: 'get'
  })
}

// 新增采购管理-采购到货单主
export function addArrived(data) {
  return request({
    url: '/cg/arrived',
    method: 'post',
    data: data
  })
}

// 修改采购管理-采购到货单主
export function updateArrived(data) {
  return request({
    url: '/cg/arrived',
    method: 'put',
    data: data
  })
}

// 删除采购管理-采购到货单主
export function delArrived(id) {
  return request({
    url: '/cg/arrived/' + id,
    method: 'delete'
  })
}
// 查询采购订单明细
export function getOrderDetails(query) {
  return request({
    url: '/cg/arrived/getOrderDetails',
    method: 'get',
    params: query
  })
}
//申请入库
export function applyRecpt(id) {
  return request({
    url: '/cg/arrived/applyRecpt/' + id,
    method: 'get'
  })
}
